<template>
  <div class="card">
    <div class="card-header">
      <div class="card-title" v-if="title">{{ title }}</div>
      <slot v-else name="title"></slot>
    </div>
    <div class="card-content">
      <slot></slot>
    </div>
    <div class="card-footer" v-if="isFooter">
      <slot name="footer"></slot>
    </div>
    <div class="card-cursor"></div>
  </div>
</template>
<script setup>
import { ref, onMounted } from 'vue';
const props = defineProps({
  title: {
    type: String,
    default: '',
  },
  type: {
    type: String,
    default: 'default',
  },
  isFooter: {
    type: Boolean,
    default: false,
  },
});
</script>
<style lang="scss" scoped>
.card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 24px;
  box-sizing: border-box;
  .card-header {
    width: 100%;
    display: flex;
    align-items: center;
    // padding: 12px;
  }
  .card-content {
    flex: 1;
  }
  .card-footer {
    text-align: right;
  }
  .card-title {
    font-size: 32px;
    font-weight: 600;
  }
  .card-cursor {
    width: 140px;
    height: 140px;
    position: absolute;
  }
}
</style>
